package com.ok.event;

import cn.hutool.core.util.StrUtil;
import com.ok.constant.WsEventEnum;
import com.ok.constant.WsUrlTypeEnum;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

/**
 * 组态监测点数据变动推送-连接打开
 */
@Slf4j
@Service
public class EMSWsPointDataChangeOpenHandle implements WsEvent {
    @Override
    public Object eventHandle(DcomWsSocket ds, String eventParam) {
        if (ds==null||StrUtil.isEmpty(ds.urlType)||ds.session==null||StrUtil.isEmpty(ds.wsSessionId)||StrUtil.isEmpty(ds.token)){
            return null;
        }
        if (!ds.urlType.equals(WsUrlTypeEnum.tablePointRDataChangeEMS.getCode())){
            return null;
        }
        log.info("EMSWsPointDataChangeOpenHandle---");
        return null;
    }

    @Override
    public WsEventEnum getCurrEventEnum() {
        return WsEventEnum.open;
    }


}
